#程序文件Pex5_3.py
from scipy.optimize import linprog
c=[110, 120, 130, 110, 115,-150]    #目标向量
A =[[1,1,0,0,0, 0],[0,0,1,1,1,0],[8.8,6.1,2.0,4.2,5.0,-6],[-8.8,-6.1,-2.0,-4.2,-5.0,3]]
b=[[200],[250],[0],[0]]; Aeq=[[1,1,1,1,1,-1]]; beq=[0]
res=linprog(c,A,b,Aeq,beq)
print("目标函数的最小值：",res.fun)
print("最优解为：",res.x)

